package com.primb.bench.project.search.contract;

import android.view.ViewGroup;

import com.primb.baselibs.base.BasePresenter;
import com.primb.bench.project.approval.entity.ApprovalListEntity;
import com.primb.bench.project.search.entity.PriceListEntity;
import com.primb.bench.project.search.entity.ReapplyListEntity;
import com.primb.bench.project.search.entity.RequestPriceEntity;

import java.util.HashMap;
import java.util.List;

import rx.Observable;

/**
 * Created by Chen on 2017/7/17.
 * 功能描述：
 */

public class SearchListContract {

    public static final int KEY_PRICE = 1001;
    public static final int KEY_REAPPLY = 1002;
    public static final int KEY_APPROVAL = 1003;

    public interface View<T> {
        void showLoading();

        void hideLoading();

        void showError(String error);

        void configListView();

        void setDataToList(List<T> entity);

        void loadMoreList(List<T> entity);

        void loadMoreField();

        void clearListData();
    }

    public interface Presenter<T> extends BasePresenter {
        void getDataList(RequestPriceEntity entity);

        RequestPriceEntity getRequestPriceEntity();

        void loadMoreList();

        void showSearchCondition(RequestPriceEntity entity, ViewGroup viewGroup);

        void addConditionView(String condition, ViewGroup viewGroup);
    }

    public interface Model {

        Observable<List<ApprovalListEntity.DataBean>> getApprovalListInfo(RequestPriceEntity entity);

        Observable<List<ReapplyListEntity.DataBean>> getReapplyListInfo(RequestPriceEntity entity);

        Observable<List<PriceListEntity.DataBean>> getPriceListInfo(RequestPriceEntity entity);
    }

}